package com.suixinsanren.design.state.demo.demo01;

/**
 * 已售罄状态
 */
public class SoldOutState implements State {

    private GumballMachine gumballMachine;

    public SoldOutState(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertQuarter() {
        System.out.println("糖果已经卖完，投币已退还");
    }

    @Override
    public void ejectQuarter() {
        System.out.println("无法退换，还没有投入硬币");
    }

    @Override
    public void turnCrank() {
        System.out.println("已经转动曲柄，但是机器里没有糖果了");
    }

    @Override
    public void dispense() {
        System.out.println("已经没有糖果了");
    }
}
